Skip to content

Comments

fix: Global wait not working with toBeDisplayed#2023

Draft
dprevost-LMI wants to merge 18 commits intowebdriverio:mainfrom
dprevost-LMI:fix-global-wait-not-working-in-toBeDisplayed
Draft

fix: Global wait not working with toBeDisplayed#2023
dprevost-LMI wants to merge 18 commits intowebdriverio:mainfrom
dprevost-LMI:fix-global-wait-not-working-in-toBeDisplayed

Conversation

@dprevost-LMI
Copy link
Contributor

@dprevost-LMI dprevost-LMI commented Feb 14, 2026

Fixes #2020

The index.ts#setDefaultOptions method sets a global configuration in a way that is not obvious when making code changes to matchers, which leads to the issue mentioned above.

This PR fixes the regression, adds unit and integration tests, and adds a prevention mechanism to better account for the global configuration.

  • Modify the setDefaultOptions to allow multiple different global DEFAULT_OPTION constants to be modified and ease their usage as default value in the matchar's function signature
  • Add a lint rule to catch any new DEFAULT_OPTIONS constant not in the proper list to get altered by setDefaultOptions
  • Add better test coverage to ensure the global configuration is taken into consideration in toBeMatchers
  • Deprecated setOptions in favour of setDefaultOptions

Waiting for the merge of: #2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toBeDisplayed() not respecting Webdriverio's waitForTimeout or waitForInterval

1 participant